package com.springboot.springboot4.Bean;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @ClassName:
 * @author: CKC
 * @DateTime: 2021/1/30 13:08
 */

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@TableName("user")//实际的表名
public class User {
    
    /**
     * 所有属性都应该在数据库中有，但是加上@TableField(exist = false) 就不一样了
     */
    @TableField(exist = false)
    private String userName;
    @TableField(exist = false)
    private String password;
    public User(String userName,String password){
        this.userName=userName;
        this.password=password;
    }
    
    
    
    //以下是数据库字段
    
    private Long id;
    private String name;
    private Integer age;
    private String email;
    
}